home *** CD-ROM | disk | FTP | other *** search
- #! /bin/csh
- # sem is a csh script to perform semantic analysis of a Fortran program
- # using ISTLA.
- #
- #
- # Invocation:
- #
- # sem Fortran_source_file
- #
- # Check command line validity.
- if ( $#argv == '0' ) then
- TOOLPACKPATH/toolpack1.2/util/echoerr \
- Invocation:
- TOOLPACKPATH/toolpack1.2/util/echoerr ""
- TOOLPACKPATH/toolpack1.2/util/echoerr \
- sem Fortran_source_file
- TOOLPACKPATH/toolpack1.2/util/echoerr ""
- TOOLPACKPATH/toolpack1.2/util/echoerr \
- Error/Warning messages sent to standard output and may be redirected to a file.
- TOOLPACKPATH/toolpack1.2/util/echoerr ""
- exit
- endif
- # Check that Fortran_source_file exists.
- if ( -e $1 == 0 ) then
- TOOLPACKPATH/toolpack1.2/util/echoerr \
- "'$1' does not exist."
- exit
- endif
- #
- # Create PFS. If PFS already exists, exit with an advisory message.
- #
- if ( -e _.TOOLPACK == 0 ) then
- mkdir _.TOOLPACK
- else
- TOOLPACKPATH/toolpack1.2/util/echoerr \
- Toolpack-created directory '"_.TOOLPACK"' exists. \
- Remove with script '"discard"'.
- exit
- endif
- # Make a tab-free copy of the Fortran source and use it as source.
- set src = la.src$$
- expand $1 > _.TOOLPACK/$src
- # Comment file name.
- set cmt = _.lacmt
- # Parse tree file name.
- set tree = _.latree
- # Symbol table file name.
- set symb = _.lasymb
- # Comment index file name.
- set indx = _.laindx
- # Attribute file name.
- set attrib = _.laattrib
- # Create the interprocess file IST.CMD and append parameters for ISTLA.
- TOOLPACKPATH/toolpack1.2/util/mkipf \
- $src $cmt $tree $symb $indx $attrib
- #
- # Invoke ISTLA.
- #
- TOOLPACKPATH/toolpack1.2/exec/istla.u
- #
- # If tool terminated with errors, advise user to obtain listing
- if ( `cat _.TOOLPACK/_.info` == -1 ) then
- TOOLPACKPATH/toolpack1.2/util/echoerr ""
- TOOLPACKPATH/toolpack1.2/util/echoerr \
- 'Errors detected. Invoke script "getlst" to obtain a listing showing'
- TOOLPACKPATH/toolpack1.2/util/echoerr \
- statement and token numbers.
- TOOLPACKPATH/toolpack1.2/util/echoerr ""
- endif
- #
- /bin/rm -r _.TOOLPACK
- #
-